/* 群聊容器 */
.groupChatContainer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 群聊头部 */
.groupChatHeader {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backButton {
    background: none;
    border: none;
    font-size: 16px;
    color: #007aff;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.backButton:hover {
    background-color: #f0f0f0;
}

.groupInfo {
    display: flex;
    align-items: center;
    flex: 1;
}

.groupAvatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.defaultGroupAvatar {
    width: 100%;
    height: 100%;
    background-color: #28a745;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.groupDetails {
    flex: 1;
}

.groupName {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 2px;
}

.groupMembers {
    font-size: 12px;
    color: #666666;
}

/* 群聊菜单 */
.menuContainer {
    position: relative;
}

.menuButton {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.menuButton:hover {
    background-color: #f0f0f0;
}

.groupMenu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 150px;
    z-index: 1000;
    margin-top: 4px;
}

.menuItem {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menuItem:hover {
    background-color: #f5f5f5;
}

.dangerItem {
    color: #f44336;
}

.dangerItem:hover {
    background-color: #ffebee;
}

/* 模态框样式 */
.modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modalHeader h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.closeButton {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.closeButton:hover {
    background-color: #f0f0f0;
}

.modalBody {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
}

.userList {
    max-height: 300px;
    overflow-y: auto;
}

.userItem {
    display: flex;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.userItem:last-child {
    border-bottom: none;
}

.userItem:hover {
    background-color: #f9f9f9;
}

.userItem input[type="checkbox"],
.userItem input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.userItem span {
    font-size: 14px;
    color: #333;
}

.modalFooter {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
}

.cancelButton {
    background-color: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancelButton:hover {
    background-color: #e0e0e0;
}

.confirmButton {
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.confirmButton:hover:not(:disabled) {
    background-color: #0056cc;
}

.confirmButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 消息列表容器 */
.messagesContainer {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f5f5f5;
}

/* 消息项 */
.messageItem {
    margin-bottom: 16px;
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.sentMessage {
    justify-content: flex-end;
}

.receivedMessage {
    justify-content: flex-start;
}

.messageContent {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.senderName {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
    color: #666;
}

.sentMessage .messageContent {
    background-color: #007aff;
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.receivedMessage .messageContent {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    margin-right: auto;
}

.messageText {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 4px;
}

.messageTime {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.sentMessage .messageTime {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.receivedMessage .messageTime {
    text-align: left;
    color: #999;
}

/* 输入区域 */
.inputContainer {
    padding: 16px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

.inputWrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background-color: #f8f8f8;
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.messageInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 100px;
    min-height: 20px;
    padding: 4px 0;
}

.messageInput::placeholder {
    color: #999999;
}

/* 表情按钮 */
.emojiButton {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.emojiButton:hover {
    background-color: #e0e0e0;
}

/* 表情选择器 */
.emojiPicker {
    position: absolute;
    bottom: 100%;
    left: 16px;
    right: 16px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin-bottom: 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.emojiGrid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.emojiItem {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.emojiItem:hover {
    background-color: #f0f0f0;
}

.sendButton {
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
}

.sendButton:hover:not(:disabled) {
    background-color: #0056cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 122, 255, 0.4);
}

.sendButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 加载和错误状态 */
.loadingContainer,
.errorContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

.loadingText {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

.errorText {
    font-size: 16px;
    color: #f44336;
    text-align: center;
    margin-bottom: 16px;
    max-width: 80%;
}

.retryButton {
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.retryButton:hover {
    background-color: #0056cc;
}

/* 滚动条样式 */
.messagesContainer::-webkit-scrollbar {
    width: 4px;
}

.messagesContainer::-webkit-scrollbar-track {
    background: transparent;
}

.messagesContainer::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.messagesContainer::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.emojiPicker::-webkit-scrollbar {
    width: 4px;
}

.emojiPicker::-webkit-scrollbar-track {
    background: transparent;
}

.emojiPicker::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.emojiPicker::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.userList::-webkit-scrollbar {
    width: 4px;
}

.userList::-webkit-scrollbar-track {
    background: transparent;
}

.userList::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.userList::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .groupChatHeader {
        padding: 12px;
    }
    
    .groupAvatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .groupName {
        font-size: 15px;
    }
    
    .groupMembers {
        font-size: 11px;
    }
    
    .menuButton {
        font-size: 18px;
        min-width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .groupMenu {
        min-width: 120px;
    }
    
    .menuItem {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .modalHeader {
        padding: 16px 20px;
    }
    
    .modalHeader h3 {
        font-size: 16px;
    }
    
    .modalBody {
        padding: 16px 20px;
    }
    
    .modalFooter {
        padding: 16px 20px;
    }
    
    .messagesContainer {
        padding: 12px;
    }
    
    .messageContent {
        max-width: 85%;
    }
    
    .inputContainer {
        padding: 12px;
    }
    
    .inputWrapper {
        padding: 6px 10px;
    }
    
    .sendButton {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .emojiButton {
        font-size: 18px;
        min-width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .emojiPicker {
        left: 8px;
        right: 8px;
        padding: 12px;
    }
    
    .emojiGrid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }
    
    .emojiItem {
        font-size: 20px;
        min-width: 36px;
        height: 36px;
        padding: 6px;
    }
} 